package com.gzlg.hospital.service.Impl;

import com.gzlg.hospital.dao.ScheduleDao;
import com.gzlg.hospital.pojo.Schedule;
import com.gzlg.hospital.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Service
public class ScheduleServiceImpl implements ScheduleService {

    @Autowired
    private ScheduleDao scheduleDao;

    @Override
    public Schedule getScheduleByDoctorIdAndWorkDate(Integer doctor_id, Date work_date) {
        return scheduleDao.getScheduleByDoctorIdAndWorkDate(doctor_id, work_date);
    }

    @Override
    public void updateSchedule(Schedule schedule) {
        scheduleDao.updateSchedule(schedule);
    }

    @Override
    public List<Schedule> getSchedulesByDoctorId(Integer doctor_id) {
        return scheduleDao.getSchedulesByDoctorId(doctor_id);
    }
    @Override
    public void insertSchedule(Schedule schedule) {
        scheduleDao.insertSchedule(schedule);
    }

}